package com.hui.wanxin.web.common.mq.service;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: 灰灰
 * @date: 2023年10月14日 13:03
 * @ClassName: RabbitService
 * @Description: TODO
 */
@Service
public class RabbitService {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendMessage(String exchange,String routingKey,Object message ){

        rabbitTemplate.convertAndSend(exchange,routingKey,message);

    }

}
